var iswechat = (function(){return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1})();
  if(jwt_token() != undefined ){ // 存在登陆数据
    let exp = JSON.parse(atob(jwt_token().split('.')[1])).exp
    if( exp < time_now() ){ // 权限是否过⑦
      if(iswechat){
        window.location.href = "/oauth/wechat?initURL="+encodeURIComponent(window.location.href)
        return
      }else{
        window.location.href = "/auth/login?initURL="+encodeURIComponent(window.location.href)
        return
      }
    }
  }else{
    if(iswechat){
      window.location.href = "/oauth/wechat?initURL="+encodeURIComponent(window.location.href)
      return
    }else{
      window.location.href = "/auth/login?initURL="+encodeURIComponent(window.location.href)
      return
    }
  }